package com.zh.test.bean;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

@Component
public class Person {
    String name;
    String sex;
    String weight;

    public Person() {
        this.name = "张三";
    }

    public Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Person setName(String name) {
        this.name = name;
        return this;
    }

    public String getSex() {
        return sex;
    }

    public Person setSex(String sex) {
        this.sex = sex;
        return this;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", weight='" + weight + '\'' +
                '}';
    }

    public static void main(String[] args) {
        JSONObject j = new JSONObject();
        j.put("zhanghui","zhanghui ");
        j.put("zhanghui","lisi");
        System.out.println(j.toJSONString());
    }

}
